-- GENERATED SPELL FOR [Commander Aggro'gosh] --


function spell0_2464(pUnit, Event) --@Backhand,n/a--
pUnit:FullCastSpellOnTarget(6253,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_2464', 2259, 1)
end

function spell1_2464(pUnit, Event) --@Enrage,Self--
pUnit:FullCastSpellOnTarget(8599,pUnit)
pUnit:RegisterEvent('Sorts_2464', 609, 1)
end

function spell2_2464(pUnit, Event) --@Frightening Shout,n/a--
pUnit:FullCastSpellOnTarget(19134,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_2464', 6275, 1)
end

function spell3_2464(pUnit, Event) --@Piercing Howl,Self--
pUnit:FullCastSpellOnTarget(23600,pUnit)
pUnit:RegisterEvent('Sorts_2464', 6332, 1)
end

function Sorts_2464(pUnit, Event)
local choix_sorts_2464 = math.random(0, 3)
if choix_sorts_2464 == 0 then
pUnit:RegisterEvent('spell0_2464', 1, 1)
end
if choix_sorts_2464 == 1 then
pUnit:RegisterEvent('spell1_2464', 1, 1)
end
if choix_sorts_2464 == 2 then
pUnit:RegisterEvent('spell2_2464', 1, 1)
end
if choix_sorts_2464 == 3 then
pUnit:RegisterEvent('spell3_2464', 1, 1)
end
end

function mob2464_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_2464', math.random(1500, 3000), 1)
end

function mob2464_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob2464_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob2464_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(2464, 1, 'mob2464_Action')
RegisterUnitEvent(2464, 2, 'mob2464_Leave')
RegisterUnitEvent(2464, 3, 'mob2464_Kill')
RegisterUnitEvent(2464, 4, 'mob2464_Die')
